<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<mesoBoard.Data.User>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<% mesoBoard.Data.Post LastPost = (mesoBoard.Data.Post)ViewData["LastPost"]; %>
<% mesoBoard.Data.UserProfile uProfile = Model.UserProfile; %>
    <fieldset>
        <legend><%= Html.ThemeImage("user.png") %> User Profile: <%= Model.Username %></legend>
        
            <div class="post_body last_post">
            <div class="post_user">
                <% if(!string.IsNullOrEmpty(uProfile.Avatar)){ %>   
                <div class="post_user_avatar">
                <%= Html.UserAvatar(Model.UserID) %>
                </div>
                <%} %>
                
                <div class="post_username">
                <%= Html.UsernameLink(Model) %>
                </div>
                
                <div class="post_user_rank">
                    <%= Html.UserRank(Model) %>
                </div>
            
                <ul class="post_user_details">
                    <li><%= Html.ActionLink("Private Message", "SendMessage", "Messages", new { ToUserName = Model.Username }, "") %></li>
                    <li><%= Model.TotalPosts %> posts</li>
                    <li>Joined: <%= Model.RegisterDate.ToString("MMM yyyy") %></li>
                    
                    <li>--------------</li>
                    
                    <li>Location: <%= uProfile.Location %> </li>
                    <li>AIM: <%= uProfile.AIM %></li>
                    <li>ICQ: <%= uProfile.ICQ %></li>
                    <li>MSN: <%= uProfile.MSN %></li>
                    <li>Website: <%= uProfile.Website %></li>
                </ul>
            </div>
            
            <div class="post_text"> 
                <%= Html.Spacer(10) %>
                <ul class="post_user_details">
                    <li>Last Post: <%= LastPost != null ? Html.ThreadLink(LastPost.ThreadID, "", false, false) : "No posts" %> </li>
                    <li>Threads Created: <%=  ViewData["ThreadCount"] %></li>
                </ul>
                
                <div class="post_user_signature">
                <%= string.IsNullOrEmpty(uProfile.Signature) ?  "" : Html.ParsePostText(uProfile.Signature) %>
                </div>
            </div>
        </div>

    </fieldset>
</asp:Content>

